home *** CD-ROM | disk | FTP | other *** search
Makefile | 1996-11-11 | 5.0 KB | 198 lines |
- #! smake
- #
- # Copyright (c) Mark J. Kilgard, 1995.
- #
- include $(ROOT)/usr/include/make/commondefs
-
- # NOTE: In my GLUT development tree, many of the C source files for
- # GLUT are generated. For this reason, "make full_clobber" will remove
- # these generated C files, while "make clobber" will not.
-
- TOP = ../..
-
- TARGETS = libglut.a
-
- LN = ln -s
- MV = mv
- RM = -rm -rf
-
- ANN_HDRS = glutint.ah
- ANN_GENHDRS = $(ANN_HDRS:.ah=.h)
- HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h
-
- ANN_SRCS = \
- glut_cindex.ac \
- glut_cursor.ac \
- glut_dials.ac \
- glut_event.ac \
- glut_fullscrn.ac \
- glut_init.ac \
- glut_input.ac \
- glut_menu.ac \
- glut_modifier.ac \
- glut_overlay.ac \
- glut_shapes.ac \
- glut_space.ac \
- glut_tablet.ac \
- glut_win.ac \
- glut_winmisc.ac \
-
- ANN_GENSRCS = $(ANN_SRCS:.ac=.c)
-
- SRCS = \
- glut_bitmap.c \
- glut_bwidth.c \
- glut_cindex.c \
- glut_cursor.c \
- glut_dials.c \
- glut_event.c \
- glut_ext.c \
- glut_fullscrn.c \
- glut_get.c \
- glut_init.c \
- glut_input.c \
- glut_menu.c \
- glut_modifier.c \
- glut_overlay.c \
- glut_shapes.c \
- glut_space.c \
- glut_stroke.c \
- glut_swidth.c \
- glut_tablet.c \
- glut_teapot.c \
- glut_util.c \
- glut_win.c \
- glut_winmisc.c \
- layerutil.c \
-
- SRCSSEMIGENS = \
- glut_8x13.c \
- glut_9x15.c \
- glut_hel10.c \
- glut_hel12.c \
- glut_hel18.c \
- glut_tr10.c \
- glut_tr24.c \
-
- SRCGENS = glut_roman.c glut_mroman.c
- OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o) $(SRCGENS:.c=.o)
- OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c
- OTHERSRCS = strokegen.y strokelex.l stroke.h
- FONTS = Roman.stroke MonoRoman.stroke
-
- LCOPTS = -I$(TOP) -fullwarn -wlint,-f -woff 813,852,827,826
- LDIRT = *~ $(SRCGENS) $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure cannotate
-
- default: $(TARGETS)
-
- .SUFFIXES : .ah .ac
-
- CANNOTATE = cannotate
-
- $(CANNOTATE) : cannotate.c
- $(CC) $(CFLAGS) -o $@ cannotate.c
-
- sinclude ObjectType.mk
-
- $(ANN_GENSRCS) $(ANN_GENHDRS) : $(CANNOTATE)
- $(SRCS) $(ANN_GENSRCS) : $(ANN_GENHDRS)
- $(SRCS) $(ANN_GENSRCS) : $(HDRS)
-
- $(X).ac.c :
- $(RM) $(.TARGET)
- ./cannotate -c $(.IMPSRC)
- $(X).ah.h :
- $(RM) $(.TARGET)
- ./cannotate -c $(.IMPSRC)
-
- libglut.a : $(OBJS)
- $(RM) $@
- $(AR) crl $@ $(OBJS)
-
- .ORDER : strokegen.h strokegen.c
-
- strokegen.h strokegen.c : strokegen.y
- $(YACC) -d strokegen.y
- $(MV) y.tab.c strokegen.c
- $(MV) y.tab.h strokegen.h
-
- # avoid warnings when compiling lex generated code
- strokegen.o : strokegen.c
- $(CC) -g -c -MDupdate Makedepend strokegen.c
-
- strokelex.c : strokelex.l
- $(LEX) strokelex.l
- $(MV) lex.yy.c strokelex.c
-
- # avoid warnings when compiling lex generated code
- strokelex.o : strokelex.c
- $(CC) -c -MDupdate Makedepend strokelex.c
-
- strokegen : strokegen.o strokelex.o
- $(CC) -o $@ $(CFLAGS) strokegen.o strokelex.o -ll
-
- capturexfont : capturexfont.o
- $(CC) -o $@ $(CFLAGS) capturexfont.o -lX11
-
- $(X)glut_roman.c : Roman.stroke strokegen
- ./strokegen -s glutStrokeRoman < Roman.stroke > $@
-
- $(X)glut_mroman.c : MonoRoman.stroke strokegen
- ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@
-
- glutsrc.ps : $(SRCS)
- $(RM) hardcopy
- mkdir -p hardcopy
- for i in $(SRCS) ;\
- do \
- grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \
- done
- cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort`
- $(RM) hardcopy
-
- # The bitmap files can be generated using capturexfont, but because
- # they require a connection to an X server and potentially different
- # X servers have different fonts, these generated files are part
- # of the GLUT distribution.
-
- 9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1
- 8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1
- TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1
- TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1
- HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
- HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
- HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
-
- semigens : capturexfont
- ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen
- ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen
- ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen
- ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen
- ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen
- ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen
- ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen
-
- # unused test rule for test building 16-bit font
- JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
- glut_jis.c :
- ./capturexfont $(JIS) glutBitmapJis > $@
-
- sources: $(SRCGENS) $(SRCS)
-
- # delete everything but source generated C files
- special_clobber: rmtargets
- -rm -rf *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure *.o Makedepend cannotate
-
- true_clobber: clobber
- $(RM) $(ANN_GENSRCS) $(ANN_GENHDRS)
-
- ./glut.h : glut.h
- ./glutint.h : glutint.h
- ./glutstroke.h : glutstroke.h
- ./strokegen.h : strokegen.h
- ./stroke.h : stroke.h
- ./layerutil.h : layerutil.h
- strokelex.o: strokelex.c strokegen.h
-
- include $(COMMONRULES)
-